
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="ntModalLabel">{:strtoupper($title)}</h4>
                <input type="hidden" id="pro_id" value="{$pro_id}">
            </div>
            <div class="modal-body">
                    <div class="row clearfix">
                            <div class="col-md-12 column">
                                <div class="alert alert-dismissable alert-info">
                                    <button type="button" class="close">×</button>
                                    <p></p>
                                </div>
                            </div>
                        </div>
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <table class="table table-striped ntTable">
                            <thead>
                                <tr>
                                    <td>{:strtoupper(lang("the_role_of_product"))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <select class="form-control" id='procharss'>

                                            <option value='all'>{:strtoupper(lang("all_roles"))}</option>
                                            {if isset($prochar)}
                                            {foreach $prochar as $k=>$v}
                                            <option value="{$v.id}"> {$v.feature_zh}</option>
                                            {/foreach}
                                            {/if}
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <th></th>
                                    <th>{:strtoupper(lang("accessory's_name"))}</th>
                                    <th>{:strtoupper(lang("quantity"))}</th>
                                    <th>{:strtoupper(lang("product/role_configuration"))}<br></th>
                                </tr>
                            </thead>
                            <tbody class="acce">
                                {if isset($proitemcat)}
                                    {foreach $proitemcat as $k1=>$v1}
                                        <tr>
                                            <th class="text-center">
                                                <input type="checkbox" name="itemcat" value="{$v1.id}" >
                                            </th>
                                            <td>{$v1.content}</td>
                                            <td>
                                                <input type="number" name="item_qty" class="form-control input-sm text-right" placeholder="{:strtoupper(lang('quantity_of_accessories_per_product'))}" value="1" style="width:8em" >
                                            </td>

                                            <input type="hidden" name="is_public" value="{$v1.is_public}">
                                            {if condition="$v1.is_public neq 1"}
                                            <td>
                                                <span class="form-inline input-sm">
                                                    <div class="form-group" style="padding-right:2em">
                                                        <label>{:strtoupper(lang("quantity"))}/CTN</label>
                                                        <input type="number" name="package_qty" class="form-control input-sm text-right" placeholder="{:strtoupper(lang('quantity_of_product_per_box'))} un" value="1">
                                                    </div>
                                                    <div class="form-group" style="padding-right:2em">
                                                        <label>{:strtoupper(lang("dimension"))}/CTN</label>
                                                        <input type="text" name="ctn_size" class="form-control input-sm text-center" placeholder="每箱产品尺寸LxWxH cm" value="50x40x30">
                                                    </div>
                                                    <div class="form-group" >
                                                        <label>{:strtoupper(lang("weight"))}/CTN</label>
                                                        <input type="number" name="ctn_kgs" class="form-control input-sm text-right" placeholder="{:strtoupper(lang('weight_per_box'))} KG" value="10.0">
                                                    </div>
                                                </span>
                                            </td>
                                            {else /}
                                                <td colspan="2">{$v1.id} / {$v1.content}</td>
                                            {/if}
                                        </tr>
                                    {/foreach}
                                {/if}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>{:strtoupper(lang('cancel'))}</button>
                <button type="button" class="btn btn-primary save"  style="padding-left:24px;padding-right:24px"><span class="glyphicon glyphicon-ok"></span>{:strtoupper(lang('confirm'))}</button>
            </div>
    <script type="text/javascript">

        $('.save').click(function(){
             var data=[]
            $('.acce tr').each(function(){
                if($(this).find('[type=checkbox]').prop('checked')){
                    var obj={}
                    $(this).find('input').each(function(){
                        obj[$(this).attr('name')]=$(this).val()
                    })
                    data.push(obj)
                }
            })
            $.ajax({
                url: '/admin/product/proAddNewJump_itemNewAdd?request=insert',
                type: 'post',
                data:{
                    data,
                    pro_id:$('#pro_id').val(),
                    prochar:$('#procharss option:selected').val()
                },
                success: function (res) {
                    res = JSON.parse(res)
                    if (res.status != 1) {
                        //toastr.warning(data.msg);
                        change_mes_type('.modal-body .alert',res.status)
                        $('.modal-body .alert').show()
                        $('.modal-body .alert p').html('*'+res.msg+'<br>')
                    } else {
                        change_mes_type('.alert',res.status)
                        $('.alert').show()
                        $('#proitem_newModal').modal('hide')
                        $('.alert p').html('*'+res.msg+'<br>')
                        //toastr.info(data.msg)
                    }
                }
            })
        });
        
    </script>